//
//  ImageTemplateView.m
//  ResourceLoader
//
//  Created by winston on 13-4-10.
//  Copyright (c) 2013年 winston. All rights reserved.
//

#import "ImageTemplateView.h"

@implementation ImageTemplateView

//-(void)renderTemplate
//{
//    self.type = ImageTemplateType;
//    
//    if(clipView==nil)
//    {
//        //因为背景图有2个像素的阴影
//        clipView = [[UIView alloc] initWithFrame:CGRectMake(2,1,self.frame.size.width-5,self.frame.size.height-2)];
//        [self addSubview:clipView];
//        [clipView release];
//        clipView.clipsToBounds = YES;
//        
//        imagebgView = [[UIImageView alloc]initWithFrame:CGRectMake((clipView.frame.size.width-TemplateImageBGWidth)/2, (clipView.frame.size.height-TemplateImageBGHeight)/2,TemplateImageBGWidth,TemplateImageBGHeight)];
//        [clipView addSubview:imagebgView];
//        [imagebgView release];
//        imagebgView.image = [UIImage imageNamed:@"AllAuto_Appearance_Image_Middel"];
//        
//        imageView = [[UIImageView alloc]initWithFrame:CGRectMake(1,1,imagebgView.frame.size.width-2,imagebgView.frame.size.height-2)];
//        [imagebgView addSubview:imageView];
//        [imageView release];
////        imageView.layer.cornerRadius = 8;
////        imageView.layer.masksToBounds = YES;
//    }
//
//    NSString * imageFile = [NSString stringWithFormat:@"%@/%@",[[ResourceLoader getInstance]getModulePathByKey:self.moduleKey withAutoID:self.autoID],[self.middleImageArray objectAtIndex:0]];
//    UIImage * image = [[UIImage alloc]initWithContentsOfFile:imageFile];
//    [imageView setImage:image];
//    [image release];
//    
//    self.playPath = [NSString stringWithFormat:@"%@/%@",[[ResourceLoader getInstance]getModulePathByKey:self.moduleKey withAutoID:self.autoID],[self.bigImageArray objectAtIndex:0]];
//}
//
//-(void)TransmutationSmall
//{
//    clipView.frame = CGRectMake(2,1,self.frame.size.width-5,self.frame.size.height-2);
//    imagebgView.frame = CGRectMake((self.frame.size.width-TemplateImageBGWidth)/2, (self.frame.size.height-TemplateImageBGHeight)/2,TemplateImageBGWidth,TemplateImageBGHeight);
//    imageView.frame = CGRectMake(1,1,imagebgView.frame.size.width-2,imagebgView.frame.size.height-2);
////    backimageView.hidden = NO;
//}
//
//-(void)TransmutationMiddle
//{
//    clipView.frame = CGRectMake(0, 0, TemplateImageBGWidthMiddle,TemplateImageBGHeightMiddle);
//    imagebgView.frame = CGRectMake(0,0, TemplateImageBGWidthMiddle, TemplateImageBGHeightMiddle);
//    imageView.frame = CGRectMake(4,3,imagebgView.frame.size.width-10,imagebgView.frame.size.height-14);
////    backimageView.hidden = YES;
//    [self bringSubviewToFront:clipView];
//}
@end
